<template>
  <div>
    <van-search
      v-model="value"
      label="型号"
      placeholder="请输入设备型号"
      @click="$router.push('/Search')"
    />
    <van-tree-select
      :items="items"
      :active-id.sync="activeId"
      :main-active-index.sync="activeIndex"
      @click-item="onClickitem"
    />
  </div>
</template>

<script>

export default {
  data () {
    return {
      value: '',
      active: 1,
      activeId: 0,
      activeIndex: 0,
      items: [
        {
          text: '一级分类1的粉丝的粉丝粉丝', children: [
            {
              text: '一级分类1子类12222',
              id: 1,
            },
            {
              text: '一级分类1子类2',
              id: 2,
            },
          ]
        },
        {
          text: '一级分类2', children: [
            {
              text: '一级分类2子类1',
              id: 3,
            },
          ],
        },
      ],
    }
  },
  created () {

  },
  methods: {
    onClickitem () {
      // this.$toast(this.activeId);
      // this.$router.push('/GoodsList/'+this.activeId)
      this.$router.push('/GoodsList')
    }
  }
}
</script>

<style>
</style>